import axios from 'axios'

export default {

  // 退货
  async returnGoods(data) {
    let result = await axios({
      url: '/api/aftersales/returngoods',
      method: 'post',
      data: data
    })
    return result
  },
  // 换货
  async exchangeGoods(data) {
    let result = await axios({
      url: 'api/aftersales/exchangegoods',
      method: 'post',
      data: data
    })
    return result
  },
  // 维修
  async repairgoods(data) {
    let result = await axios({
      url: 'api/aftersales/repairgoods',
      method: "post",
      data: data
    })
    return result
  },
  // 提交延期交付
  async applyfordelay(data) {
    let result = await axios({
      url: 'api/delay/apply',
      method:"post",
      data: data
    })
    return result
  },
  // 通过订单号完成交付
  async finishTheDelay(data) {
    let result = await axios({
      url: 'api/delay/finish',
      method: "post",
      data: data
    })
    return result
  },
  // 通过电话和门店id搜索客户未完成延期交付订单
  async searchforDelay(data) {
    let result = await axios({
      url: 'api/delay/search',
      method: 'post',
      data: data
    })
    return result
  }
}
